using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Elderos.Ontology
{
    public interface IOntologyData : ISynonymSource
    {
        List<Attribute> Attributes { get; }

        List<FreebaseType> Types { get; }

        HashSet<string> CommonWords { get; }

        HashSet<string> PreNames { get; }

        Dictionary<string, int> Trigrams { get; }

        Dictionary<string, DictionaryWord> WordsDictionary { get; }
        bool Initialized { get; }

        Task<Entity> GetEntityAsync(int entityID);

        Task<List<AttValue>> GetAttValuesAsync(IEnumerable<int> attributeIDs, IEnumerable<int> entityIDs);

        Task<List<AttRef>> GetAttRefsAsync(IEnumerable<int> attributeIDs, IEnumerable<int> entityIDs);
        Task<List<AttRef>> GetAttRefsAsync(IEnumerable<int> attributeIDs);

        Task<List<EntityFBType>> GetEntityFBTypesAsync(IEnumerable<int> entityIDs);

        Task<List<Synonym>> GetSynonymsAsync(IEnumerable<int> synonymIDs);

        Network GetNetwork(int networkID);
        int InsertNetwork(Network network);
        void UpdateNetwork(Network network);
        void DeleteNetwork(int networkID);

        Task<Dictionary<string, double>> GetSynonymFrequenciesAsync(IEnumerable<string> synonyms);
        void Initialize();

        IEnumerable<SynonymEntityDTO> GetFBTypeSynonyms(IEnumerable<string> fbtypes);

        IEnumerable<NameSynonym> GetNameSynonyms();
    }
}